<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>循环遍历数组</title>
</head>

<body>
    <div class="app">
       <h1>遍历人名</h1>
       <p v-for='(item,index) in newArr' :key="index">{{item}} + '------' {{index}}</p>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        var xm = new Vue({
            el: '.app',
            data: {
            newArr: ['tom','bob','amy','ls']
            },
            methods: {
            }
              
        })

    </script>
</body>

</html>